package com.brainstore.patterns.factorymethod;

import com.sun.org.apache.xerces.internal.dom.DocumentImpl;

import java.io.File;

/**
 * BRAIN-STORE PROJECT.
 * <p/>
 * User: Sasha
 * Date: 23.03.12
 * Time: 23:42
 */
public class Main {
    public static void main(String[] args) {
        AbstractWriter writer = FactoryMethod.getWriter(new File("file.txt"));

        // Write into file:
        writer.write("Text");

        writer = FactoryMethod.getWriter(new DocumentImpl());

        // Write into document:
        writer.write("Text");
    }
}
